﻿<%@ Page Language="C#" MasterPageFile="~/PresentationLayer/Split.Master" AutoEventWireup="true" CodeBehind="AreaPessoalPerc.aspx.cs" Inherits="Distrackting.PresentationLayer.AreaPessoalPerc" Title="Distrackting: Área Pessoal - Percurso" %>

<%@ Register assembly="Microsoft.Live.ServerControls.VE" namespace="Microsoft.Live.ServerControls.VE.Extenders" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="side" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="rest" runat="server">
    <div class="border large box">
    <h1 class="pagetitle">Percursos adicionados</h1>
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataSourceID="PercursoAddDataSource" 
            CellPadding="4" ForeColor="#333333" GridLines="None">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:TemplateField HeaderText="Nome" SortExpression="nome">
                <ItemTemplate>
                    <asp:Label ID="Label3" runat="server" Text='<%# Bind("nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("nome") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Localidade partida" SortExpression="cod_partida">
                <ItemTemplate>
                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("Localidade1.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("cod_partida") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Localidade chegada" SortExpression="cod_chegada">
                <ItemTemplate>
                    <asp:Label ID="Label10" runat="server" Text='<%# Eval("Localidade.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox10" runat="server" Text='<%# Bind("cod_chegada") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Âmbito" SortExpression="cod_ambito">
                <ItemTemplate>
                    <asp:Label ID="Label8" runat="server" Text='<%# Eval("Ambito.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("cod_ambito") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Dificuldade" SortExpression="cod_dificuldade">
                <ItemTemplate>
                    <asp:Label ID="Label13" runat="server" 
                        Text='<%# Eval("Dificuldade.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox13" runat="server" 
                        Text='<%# Bind("cod_dificuldade") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tipo" SortExpression="cod_tipo">
                <ItemTemplate>
                    <asp:Label ID="Label14" runat="server" 
                        Text='<%# Eval("Tipo_percurso.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox14" runat="server" Text='<%# Bind("cod_tipo") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Rating" SortExpression="rating_total">
                <ItemTemplate>
                    <asp:Label ID="Label17" runat="server" Text='<%# Bind("rating_total") %>'></asp:Label>
                    &nbsp;<asp:Image ID="Image1" runat="server" 
                        ImageUrl="~/PresentationLayer/Images/rate_star_25x23.png" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox17" runat="server" Text='<%# Bind("rating_total") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
        <asp:ObjectDataSource ID="PercursoAddDataSource" runat="server" 
            SelectMethod="getPercursosPorUtilizador" 
            TypeName="Distrackting.BusinessLayer.GerirPercursos">
            <SelectParameters>
                <asp:SessionParameter Name="user_guid" SessionField="user_guid" Type="Object" />
            </SelectParameters>
        </asp:ObjectDataSource>
    <br />
    <br />
    </div>
    <div class="blank"></div>
    <div class="border box large">
    <h1 class="pagetitle">Percursos feitos</h1>
    <asp:GridView ID="GridView4" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataSourceID="PercursosFeitosDataSource" 
            CellPadding="4" ForeColor="#333333" GridLines="None">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:TemplateField HeaderText="Nome" SortExpression="nome">
                <ItemTemplate>
                    <asp:Label ID="Label18" runat="server" Text='<%# Bind("nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox18" runat="server" Text='<%# Bind("nome") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Localidade partida" SortExpression="cod_partida">
                <ItemTemplate>
                    <asp:Label ID="Label19" runat="server" Text='<%# Eval("Localidade1.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox19" runat="server" Text='<%# Bind("cod_partida") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Localidade chegada" SortExpression="cod_chegada">
                <ItemTemplate>
                    <asp:Label ID="Label20" runat="server" Text='<%# Eval("Localidade.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox20" runat="server" Text='<%# Bind("cod_chegada") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Âmbito" SortExpression="cod_ambito">
                <ItemTemplate>
                    <asp:Label ID="Label21" runat="server" Text='<%# Eval("Ambito.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox21" runat="server" Text='<%# Bind("cod_ambito") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Dificuldade" SortExpression="cod_dificuldade">
                <ItemTemplate>
                    <asp:Label ID="Label22" runat="server" 
                        Text='<%# Eval("Dificuldade.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox22" runat="server" 
                        Text='<%# Bind("cod_dificuldade") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tipo" SortExpression="cod_tipo">
                <ItemTemplate>
                    <asp:Label ID="Label23" runat="server" 
                        Text='<%# Eval("Tipo_percurso.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox23" runat="server" Text='<%# Bind("cod_tipo") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Rating" SortExpression="rating_total">
                <ItemTemplate>
                    <asp:Label ID="Label24" runat="server" Text='<%# Bind("rating_total") %>'></asp:Label>
                    &nbsp;<asp:Image ID="Image2" runat="server" 
                        ImageUrl="~/PresentationLayer/Images/rate_star_25x23.png" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox24" runat="server" Text='<%# Bind("rating_total") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
        <asp:ObjectDataSource ID="PercursosFeitosDataSource" runat="server" 
            SelectMethod="getPercursosPercorridos" 
            TypeName="Distrackting.BusinessLayer.GerirPercursos">
            <SelectParameters>
                <asp:SessionParameter Name="user_guid" SessionField="user_guid" Type="Object" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
    <div class="blank"></div>
    <div class="border box large">
    <h1 class="pagetitle">Percursos a fazer</h1>
    <asp:GridView ID="GridView5" runat="server" AllowSorting="True" 
        AutoGenerateColumns="False" DataSourceID="PercursosARealizarDataSource" 
            CellPadding="4" ForeColor="#333333" GridLines="None">
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:TemplateField HeaderText="Nome" SortExpression="nome">
                <ItemTemplate>
                    <asp:Label ID="Label25" runat="server" Text='<%# Bind("nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox25" runat="server" Text='<%# Bind("nome") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Localidade partida" SortExpression="cod_partida">
                <ItemTemplate>
                    <asp:Label ID="Label26" runat="server" Text='<%# Eval("Localidade1.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox26" runat="server" Text='<%# Bind("cod_partida") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Localidade chegada" SortExpression="cod_chegada">
                <ItemTemplate>
                    <asp:Label ID="Label27" runat="server" Text='<%# Eval("Localidade.nome") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox27" runat="server" Text='<%# Bind("cod_chegada") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Âmbito" SortExpression="cod_ambito">
                <ItemTemplate>
                    <asp:Label ID="Label28" runat="server" Text='<%# Eval("Ambito.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox28" runat="server" Text='<%# Bind("cod_ambito") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Dificuldade" SortExpression="cod_dificuldade">
                <ItemTemplate>
                    <asp:Label ID="Label29" runat="server" 
                        Text='<%# Eval("Dificuldade.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox29" runat="server" 
                        Text='<%# Bind("cod_dificuldade") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tipo" SortExpression="cod_tipo">
                <ItemTemplate>
                    <asp:Label ID="Label30" runat="server" 
                        Text='<%# Eval("Tipo_percurso.descricao") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox30" runat="server" Text='<%# Bind("cod_tipo") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Rating" SortExpression="rating_total">
                <ItemTemplate>
                    <asp:Label ID="Label31" runat="server" Text='<%# Bind("rating_total") %>'></asp:Label>
                    &nbsp;<asp:Image ID="Image3" runat="server" 
                        ImageUrl="~/PresentationLayer/Images/rate_star_25x23.png" />
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox31" runat="server" Text='<%# Bind("rating_total") %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            
        </Columns>
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
        <asp:ObjectDataSource ID="PercursosARealizarDataSource" runat="server" 
            SelectMethod="getPercursosARealizar" 
            TypeName="Distrackting.BusinessLayer.GerirPercursos">
            <SelectParameters>
                <asp:SessionParameter Name="user_guid" SessionField="user_guid" Type="Object" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </div>
</asp:Content>
